Open
Conversation
Contributor
Author
|
Travis seems broken but there's one failing test:
// The DomTreeBuilder has special handling for text when in before head mode.
$html = '<!DOCTYPE html><html>
Foo<head></head><body></body></html>';
$doc = $this->parse($html);
$this->assertEquals('Line 0, Col 0: Unexpected text. Ignoring: Foo', $this->errors[0]);
$headElement = $doc->documentElement->firstChild;
$this->assertEquals('head', $headElement->tagName);Not sure how this case should be handled now. When saved it now outputs: <html><head></head><body>
Foo<head></head><body></body></body></html> |
Contributor
Author
|
@goetas how about this version? |
Member
|
This looks better! (please give me some time to test this , recently i've been super busy 😢 ) |
Contributor
Author
|
No worries :) |
Member
|
@stof would you mind helping me with this ? what do you think about the change? |
ohader
reviewed
Jan 12, 2023
stof
reviewed
Jan 12, 2023
test/HTML5/Html5Test.php
Outdated
| * Test for issue #166. | ||
| * | ||
| * @param $input | ||
| * @param $expected |
Contributor
There was a problem hiding this comment.
such @param without type is totally useless. either add the types or remove those phpdoc
Member
|
I think that this has been figured out, can you please review it again? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prevents
Hello, This is a test.from being removed when parsing<html>Hello, This is a test.<br />Does it work this time?</html>https://www.w3.org/TR/2014/REC-html5-20141028/sections.html#the-body-element